
{literal}
<script type="text/javascript">

    $(document).ready(function(){

        $("#form_verifica").validate({
            rules: {
                datainicio: { required: true },
                datafim: { required: true },
                horainicio: { required: true},
                horafim: { required: true},
                tipo: { required: true}
            },
            messages: {
            	datainicio: { required: "Obrigatorio" },
            	datafim: { required: "Obrigatorio" },
            	horainicio: { required: "Obrigatorio" },
            	horafim: { required: "Obrigatorio" },
            	tipo: { required: "Obrigatorio" }
            },

            submitHandler: function(form) {
				jqAjaxForm(form, "div_verificar");
			}
        });

        populaSelect('unidade', '{/literal}{$_site.url}{literal}', 'unidade/select-unidade');

        $("#unidade").change(function () {
        	populaSelect('sala', '{/literal}{$_site.url}{literal}', 'sala/select-sala?codunidade='+$(this).attr("value"));
        });

        $('#datainicio').datepick({showOn: 'both'});
        $("#datainicio").mask("99/99/9999");
        $('#datafim').datepick({showOn: 'both'});
        $("#datafim").mask("99/99/9999");
        $('#horainicio').mask("99:99");        
        $('#horafim').mask("99:99");

        populaSelect("tipo", '{/literal}{$_site.url}{literal}', "tipo-sala/select-tipo-sala");


        $(document).ready(function(){
            jqAjaxLink("{/literal}{$_site.url}{literal}area-cliente/calendario-ambientes", "", "div_calendario");
        }); 
        
    }); //fecha $(


</script>
{/literal}
<form id="form_verifica" name="form_unidade" method="post" action="{$_site.url}area-cliente/verificar-disponibilidade-sala">

    		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mvTituloFundo">
				  <tr>
					<td>
					Verificar disponibilidade
					</td>
				  </tr>
			</table>
    		<table width="100%" border="0" cellspacing="0" cellpadding="0">                
                <tr>
                  <td class="contForm">                 
                  <table width="100%" border="0" cellspacing="3" cellpadding="0">
                      <tr>
                        <td valign="top" class="fundoTituloForm">Data in&iacute;cio:</td>
                        <td class="bordaFormResp"><input name="datainicio" type="text" class="formulario" id="datainicio" value="{$banco->vhr_numero}" size="10"/></td>
                        <td valign="top" class="fundoTituloForm">Data fim:</td>
                        <td class="bordaFormResp"><input name="datafim" type="text" class="formulario" id="datafim" value="{$banco->vhr_numero}" size="10"/></td>
                      </tr>
                      <tr>
                        <td valign="top" class="fundoTituloForm">Hora in&iacute;cio:</td>
                        <td class="bordaFormResp"><input name="horainicio" type="text" class="formulario" id="horainicio" value="{$banco->vhr_numero}" size="10"/></td>
                        <td valign="top" class="fundoTituloForm">Hora fim:</td>
                        <td class="bordaFormResp"><input name="horafim" type="text" class="formulario" id="horafim" value="{$banco->vhr_numero}" size="10"/></td>
                      </tr>
                      <tr>
                        <td valign="top" class="fundoTituloForm">Tipo de sala:</td>
                        <td class="bordaFormResp" colspan="3"><select name="tipo" id="tipo" class="formulario"></select></td>
                      </tr>
                      <tr>
                        <td colspan="4" class="bordaFormResp" align="center">
                          <input type="submit" value="Verificar" class="botao">
                        </td>
                      </tr>
                  </table>
                  </td>
                </tr>
              </table>	
    </form>
<br>
<div id="div_verificar"></div>
<br>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
	<tr>
		<td valign="top" width="400" >
			<div id="div_calendario"></div>
		</td>
		<td valign="top" align="left" class="paddingLeft20">
			<div id="div_agendamentos"></div>
		</td>
	</tr>
</table>